import request from '@/utils/request'

// 查询公告列表
export function listNotice(query) {
  return request({
    url: '/system/notice/list',
    method: 'get',
    params: query
  })
}

// 查询公告详细
export function getNotice(noticeId) {
  return request({
    url: '/system/notice/' + noticeId,
    method: 'get'
  })
}

// 新增公告
export function addNotice(data) {
  return request({
    url: '/system/notice',
    method: 'post',
    data: data
  })
}

// 修改公告
export function updateNotice(data) {
  return request({
    url: '/system/notice',
    method: 'put',
    data: data
  })
}

// 删除公告
export function delNoticeupdata(data) {
  return request({
    url: '/component-conf/delete?componentInfoConfListId=' + data,
    method: 'post'
  })
}
// 删除帖子
export function delNotice(noticeId) {
  return request({
    url: '/system/notice/' + noticeId,
    method: 'delete'
  })
}
export function addproduct(data) {
  return request({
    url: '/component-conf/info?componentInfoConfListId=' + data,
    method: 'get'
  })
}
// 更新
export function updataProduct(data) {
  return request({
    url: '/component-conf/insert-or-update',
    method: 'post',
    data: data
  })
}
export function componentlist(query) {
  return request({
    url: '/component-conf/list',
    method: 'post',
    data: query
  })
}

export function recordList(data) {
  return request({
    url: '/user/user-access-record-list',
    method: 'post',
    data: data
  })
}